package com.leyou.upload.config;

/**
 * Created with IntelliJ IDEA.
 * User: ycs
 * Date: 2020/8/18
 * Time: 21:59
 * Description: No Description
 * 配置类
 */

import com.aliyun.oss.OSSClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OSSConfig {
    @Bean
    public OSSClient getOSSClient(OSSProperties ossProperties){
        return new OSSClient(ossProperties.getEndpoint(),
                ossProperties.getAccessKeyId(),
                ossProperties.getAccessKeySecret());
    }
}
